Trò chơi đua xe động vật trong UNITY Engine
114.633 lượt xem;
- AnimalNameShop.cs
- ShopScreen /
- AnimalRacing /
- Scripts /
- Assets /
- project /
1 using UnityEngine;
2 using System.Collections;
3
4 public class AnimalNameShop : MonoBehaviour {
5
6 private BitmapFont nameFont;
7
8 public void setFont(BitmapFont nameFont)
9 {
10 this.nameFont = new BitmapFont(nameFont, gameObject);
11 }
12
13 public void setName(string name)
14 {
15 this.nameFont.setText(name, 0, 0);
16 }
17 }
2 using System.Collections;
3
4 public class AnimalNameShop : MonoBehaviour {
5
6 private BitmapFont nameFont;
7
8 public void setFont(BitmapFont nameFont)
9 {
10 this.nameFont = new BitmapFont(nameFont, gameObject);
11 }
12
13 public void setName(string name)
14 {
15 this.nameFont.setText(name, 0, 0);
16 }
17 }